#pragma once

#include "Misc/CommonMacros.h"
#include "Math/Vec3.h"
#include "BoundingBox.m.h"
RSTRUCT()
struct WHENGINE_API SBoundingBox
{
    ROBJECT
public:
    SBoundingBox()=default;

    SBoundingBox(SVec3 InMin, SVec3 InMax):
     Min(InMin),
     Max(InMax)
    {}
    RFIELD()
    SVec3 Min=SVec3(.0f,.0f,.0f);

    RFIELD()
    SVec3 Max=SVec3(.0f,.0f,.0f);

    SVec3 GetCenter();

    SVec3 GetHalfExtent()
    {
        return (Max-Min)*0.5;
    }


};

